package com.casic.cloud.service.impl;

import com.casic.cloud.dao.ResumeDao;
import com.casic.cloud.pojo.Resume;
import com.casic.cloud.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

/**
 * @program: rare_earth_cloud
 * @description: service实现类
 * @author: Tan_sir
 * @create: 2021-05-06 09:31
 **/

@Service
public class ResumeServiceImpl implements ResumeService {

    @Autowired
    private ResumeDao resumeDao;
    @Override
    public Resume findDefaultResumeByUserId(Long userId) {
        Resume resume = new Resume();
        resume.setUserId(userId);

        resume.setIsDefault(1);
        Example<Resume> example = Example.of(resume);
        return resumeDao.findOne(example).get();
    }
}

